Peer-to-Peer networks have emerged relatively recently as a new kind of technology on the Internet. Originally used for illegal file sharing, they have found applications in data distribution, Voice over Internet Protocol (VoIP) systems, and video distribution. Modern peer-to-peer networks are based on the concept of a Distributed Hash Table (DHT). In a DHT, the contents of the hash table are distributed amongst the peer nodes participating in the peer-to-peer network. Each node stores a small sliver of the hash table. Each peer node maintains links to other peer nodes, so that when one peer node needs to look up a key in the distributed hash table, it can forward the request to a node closer, which forwards it closer, and so on. Here, ‘closer’ refers not to topological proximity, but rather, closeness of the keys used in the hash table.
Peer-to-peer networks have several important benefits. The biggest by far is that, if there are N peer nodes in the network, the amount of data each one node needs to store is 1/N of the total data. Thus, as the network grows, the scalability improves. Peer-to-peer networks facilitate new members coming and going, dynamically shuffling data around as the network grows. They also have relatively fast query times, allowing data to be found in logN hops across the network.
However, peer-to-peer networks have several drawbacks. Firstly, though they adapt to change, they are slow in that adaptation. Because peer-to-peer networks are typically implemented as overlays, each node only gradually learns about failures of other nodes to which they are adjacent. Network partitions, for example, can take a long time to fully detect and repair. Furthermore, while logN hops per query is certainly better than N, in a network where each node is 100 ms from another, queries can take many seconds to complete, even when there are relatively few nodes in the network. That makes peer-to-peer networks less optimized for real time applications.